package edu.ncst.baseweb.mapper;
import edu.ncst.baseweb.dao.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


@Mapper
public interface UserMapper extends BaseMapper<User> {

    User findByUserAccount(@Param("userAccount")String userAccount);

    User findByUserAccountAndPassword(@Param("userAccount")String userAccount,@Param("password")String password);

    Integer selectIdByUserAccount(@Param("userAccount") String userAccount);
    IPage<User> selectUserPage(Page<User> page);


    Integer getRolePeopleNumber(Integer roleid);

    Integer getAdminRoleId();


    Integer getCount();


}
